package demo08practice;

import javax.xml.crypto.Data;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Demo01 {
    public static void main(String[] args) throws ParseException {
        /*Date d=new Date();
        System.out.println(d);
        String pattern="yyyy年MM月dd日 hh时mm分ss秒";
        DateFormat df=new SimpleDateFormat(pattern);
        String format = df.format(d);
        System.out.println("format = " + format);
        String str = "2019年07月18日 11时13分32秒";
        Date parse = df.parse(str);
        System.out.println("parse = " + parse);*/
        Calendar c = Calendar.getInstance();
        System.out.println("c = " + c);
        int i1 = c.get(Calendar.YEAR);
        System.out.println("i1 = " + i1);
        c.set(Calendar.DAY_OF_WEEK,5);
        System.out.println(c.get(Calendar.DAY_OF_WEEK));

    }
}
